home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / mc51bugs.zip / Q37021 < prev    next >
Text File  |  1988-12-13  |  900b  |  37 lines

  1. Q37021 Function stat() Fails to Flag Error in OS/2
  2. C Compiler
  3. 5.10
  4. OS/2
  5.  
  6. Summary:
  7.  
  8. When run in OS/2, the source code below produces an executable that
  9. fails to flag an error indicating the specified file does not exist.
  10.  
  11. Microsoft has confirmed this to be a problem in Version 5.10. We are
  12. researching this problem and will post new information as it becomes
  13. available.
  14.  
  15. More Information:
  16.  
  17. To demonstrate this problem, compile, link, and run the following code
  18. under OS/2. The stat() function should set errno to ENOENT after
  19. failing to find the nonexistent file "data", but fails to do so.
  20.  
  21. After a suitable compilation, run the following:
  22.  
  23.    #include<sys\types.h>
  24.    #include<sys\stat.h>
  25.    #include<errno.h>
  26.  
  27.    struct stat buf;
  28.    int i, j, errno ;
  29.    main()
  30.    {
  31.       i=stat("data",&buf);
  32.       j=errno;
  33.    }
  34.  
  35. Keywords:  buglist5.10
  36. Updated  88/12/13 07:16
  37.